package DataBase;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public class BuildDaysOfWeek {
	
	
	public void build()
	{
SQLConnection sc=new SQLConnection();

		
		try {
			
			PreparedStatement ps1 = sc.getConnection().prepareStatement("INSERT INTO DaysOfWeek(day,hour) values(?,?);");	
						
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"א");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"ב");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"ג");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"ד");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"ה");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"ו");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			for (int a=1;a<25;a++)
			{
			ps1.setString(1,"שבת");
			ps1.setString(2,Integer.toString(a));			
			ps1.executeUpdate();
			}
			
			
			
			
			
			
			
			
			
ps1.close();
			
			
			
sc.getConnection().close();		
			
			
		}
		
		catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
